package de.xelerity.geolessi.srv.impl.mixed;

import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;

public class WR extends WeakReference<Integer> {

	int key ;
	public WR(Integer referent) {
		super(referent);
		key = referent.intValue();
	}

	public WR(Integer referent, ReferenceQueue<? super Integer> q) {
		super(referent, q);
	}

    public int hashCode() {
    	return key;
    }
    
    public boolean equals(Object c)
    {
    	if(c==null)return false;
    	if(c instanceof WR)
    	{
    		return ((WR)c).key == key;
    	}
    	else
    		return false;
    }
}
